﻿@using SD.IdentitySystem.IPresentation.ViewModels.Outputs
@{
    ViewBag.Title = "创建菜单";
    Layout = "~/Views/Shared/_Layout.cshtml";

    IEnumerable<InfoSystemView> Systems = ((IEnumerable<InfoSystemView>)ViewBag.InfoSystems).OrderBy(x => x.Number);
}

@section header{
    <link type="text/css" href="~/Content/css/Common/Form.css" rel="stylesheet" />
    <script type="text/javascript" src="~/Content/scripts/Menu/Add.js"></script>
}

<div style="width: 100%; height: 100%; float:left; margin: 0;">
    <div class="easyui-panel" data-options="footer:'#footer'" style="width: 100%; height: 423px; padding: 10px;">
        <form id="frmCreateMenu">
            <table id="tbAdd" style="margin: 0 auto;">
                <tr>
                    <td class="tdTitle">信息系统：</td>
                    <td class="tdContent">
                        <select class="easyui-combobox" id="slSystem" name="systemNo" data-options="editable:false,onSelect:systemSelected" style="width: 210px">
                            @foreach (InfoSystemView system in Systems)
                            {
                                <option value="@system.Number">@system.Name</option>
                            }
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="tdTitle">上级菜单：</td>
                    <td class="tdContent">
                        <input id="slMenu" name="parentId">
                    </td>
                </tr>
                <tr>
                    <td class="tdTitle">菜单名称：</td>
                    <td class="tdContent">
                        <input class="easyui-textbox" type="text" name="menuName" data-options="required:true,width:210" />
                    </td>
                </tr>
                <tr>
                    <td class="tdTitle">排序：</td>
                    <td class="tdContent">
                        <input class="easyui-numberbox" name="sort" data-options="required:true,width:210">
                    </td>
                </tr>
                <tr>
                    <td class="tdTitle">链接地址：</td>
                    <td class="tdContent">
                        <input class="easyui-textbox" type="text" name="url" data-options="width:210" />
                    </td>
                </tr>
                <tr>
                    <td class="tdTitle">图标：</td>
                    <td class="tdContent">
                        <input class="easyui-filebox" name="icon" data-options="buttonText:'选择',width:210,accept:'image/*'">
                    </td>
                </tr>
            </table>
        </form>
    </div>
    <div id="footer" style="padding: 5px;">
        <div style="float: right;">
            <a href="#" onclick="createMenu();" class="easyui-linkbutton c6" data-options="iconCls:'icon-ok'" style="width:90px">确定</a>
            <a href="#" onclick="javascript: $.easyuiExt.closeWindow();" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" style="width:90px">取消</a>
        </div>
    </div>
</div>
